package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 短信发送表
 *
 * @author zjl
 * @since 2024-06-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_send_message")
@Schema(name = "EduSendMessage", title = "短信发送表", description = "短信发送表实体类")
public class EduSendMessage extends Model<EduSendMessage> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "messageId", description = "主键")
    @TableId(value = "message_id", type = IdType.ASSIGN_ID)
    private String messageId;

    @Schema(name = "parentName", description = "家长姓名")
    @TableField(value = "parent_name")
    private String parentName;

    @Schema(name = "parentPhone", description = "家长电话")
    @TableField(value = "parent_phone")
    private String parentPhone;

    @Schema(name = "year", description = "年份")
    @TableField(value = "year")
    private Integer year;

    @Schema(name = "enrollNum", description = "第几轮报名")
    @TableField(value = "enroll_num")
    private Integer enrollNum;

    @Schema(name = "studentEnrollId", description = "报名id")
    @TableField(value = "student_enroll_id")
    private String studentEnrollId;

    @Schema(name = "sendStatus", description = "短信发送状态：0草稿，1待发送，2已发送，3发送失败")
    @TableField(value = "send_status")
    private String sendStatus;

    @Schema(name = "areaCode",description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "studentName",description = "学生姓名")
    @TableField(value = "student_name")
    private String studentName;

    @Schema(name = "del", description = "逻辑删除标志")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "更新人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private String updateName;

    @Schema(name = "updateTime", description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Schema(name = "remarks",description = "备注")
    @TableField(value = "remarks")
    private String remarks;

    @Schema(name = "studentIdcard",description = "学生身份证")
    @TableField(value = "student_idcard")
    private String studentIdcard;

    @Schema(name = "params1",description = "备用字段")
    @TableField(value = "params1")
    private String params1;

    @Schema(name = "pushStatus",description = "推送到短信内容表状态：1已推送0未推送")
    @TableField(value = "push_status")
    private String pushStatus;

    @Override
    public Serializable pkVal() {
        return this.messageId;
    }
}
